package com.wsd.domain;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author Wan Yucan
 * @date 2020/7/15-11:01
 */
@Scope("prototype")
@Component
public class Loan {
    private BigDecimal loanAmount;


    private BigDecimal remainAmount;
    private long userAccount;
    private int installmentNum;
    /**
     * repaymentType 还款方式
     * '1'：等额本金
     * '2':等额本息
     * '3':先息后本
     */
    private char repaymentType;
    private LocalDateTime loanDate;

    public Loan(){
        super();
    }


    public BigDecimal getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(BigDecimal loanAmount) {
        this.loanAmount = loanAmount;
    }


    public long getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(long userAccount) {
        this.userAccount = userAccount;
    }

    public int getInstallmentNum() {
        return installmentNum;
    }

    public void setInstallmentNum(int installmentNum) {
        this.installmentNum = installmentNum;
    }

    public char getRepaymentType() {
        return repaymentType;
    }

    public void setRepaymentType(char repaymentType) {
        this.repaymentType = repaymentType;
    }

    public LocalDateTime getLoanDate() {
        return loanDate;
    }

    public void setLoanDate(LocalDateTime loanDate) {
        this.loanDate = loanDate;
    }

    public BigDecimal getRemainAmount() {
        return remainAmount;
    }

    public void setRemainAmount(BigDecimal remainAmount) {
        this.remainAmount = remainAmount;
    }


    @Override
    public String toString() {
        return "Loan{" +
                "loanAmount=" + loanAmount +
                ", remainAmount=" + remainAmount +
                ", userAccount=" + userAccount +
                ", installmentNum=" + installmentNum +
                ", repaymentType=" + repaymentType +
                ", loanDate=" + loanDate +
                '}';
    }
}
